// 蜂窝蜜造平台生成代码，如手工更改，请添加到 .beeignore 忽略生成

package com.fowo.api.entity;

import com.baomidou.dynamic.datasource.annotation.DS;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableLogic;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fowo.api.common.annotaion.*;
import com.fowo.api.sys.entity.*;
import io.swagger.v3.oas.annotations.media.Schema;
import java.io.Serializable;
import lombok.EqualsAndHashCode;
import lombok.Getter;
import lombok.Setter;

/**
 * ProductPurchaseRecord
 */
@DS("ds24")
@Getter
@Setter
@TableName(value = "product_purchase_record", autoResultMap = true)
@Schema(title = "产品采购记录")
public class ProductPurchaseRecord implements Serializable {

  /**
   * 所属产品
   */
  @TableField(value = "`product_id`")
  @JoinField(Product.class)
  @Schema(title = "所属产品")
  private Long productId;

  /**
   * 编号
   */
  @TableField(value = "`id`")
  @TableId(type = IdType.ASSIGN_ID)
  @Schema(title = "编号")
  private Long id;

  /**
   * 创建时间
   */
  @TableField(value = "`create_time`")
  @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
  @Schema(title = "创建时间")
  private java.util.Date createTime;

  /**
   * 创建人
   */
  @TableField(value = "`create_user`")
  @Schema(title = "创建人")
  private Long createUser;

  /**
   * 更新时间
   */
  @TableField(value = "`last_update_time`")
  @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
  @Schema(title = "更新时间")
  private java.util.Date lastUpdateTime;

  /**
   * 更新人
   */
  @TableField(value = "`last_update_user`")
  @Schema(title = "更新人")
  private Long lastUpdateUser;

  /**
   * 删除标记
   */
  @TableField(value = "`del_flag`")
  @TableLogic
  @Schema(title = "删除标记")
  private Boolean delFlag;

  /**
   * 供应商
   */
  @TableField(value = "`supplier`")
  @JoinField(Supplier.class)
  @Schema(title = "供应商")
  private Long supplier;

  /**
   * 采购数量
   */
  @TableField(value = "`purchase_num`")
  @Schema(title = "采购数量")
  private Integer purchaseNum;

  /**
   * 加工费
   */
  @TableField(value = "`process_cost`")
  @Schema(title = "加工费")
  private java.math.BigDecimal processCost;

  /**
   * 单价
   */
  @TableField(value = "`price`")
  @Schema(title = "单价")
  private java.math.BigDecimal price;

  /**
   * 运费
   */
  @TableField(value = "`freight`")
  @Schema(title = "运费")
  private java.math.BigDecimal freight;

  /**
   * 是否开票
   */
  @TableField(value = "`is_invoice`")
  @Schema(title = "是否开票")
  private Boolean isInvoice;

  /**
   * 税率
   */
  @TableField(value = "`tax_rate`")
  @Schema(title = "税率")
  private java.math.BigDecimal taxRate;

  /**
   * 实际交货期
   */
  @TableField(value = "`deliver_date`")
  @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
  @Schema(title = "实际交货期")
  private java.util.Date deliverDate;

  /**
   * 采购单号
   */
  @TableField(value = "`purchase_order_code`")
  @Schema(title = "采购单号")
  private String purchaseOrderCode;

  /**
   * 到货量
   */
  @TableField(value = "`quantity_received`")
  @Schema(title = "到货量")
  private Long quantityReceived;

  /**
   * 仓库
   */
  @TableField(value = "`wid`")
  @JoinField(Warehouse.class)
  @Schema(title = "仓库")
  private Long wid;

  /**
   * 采购员
   */
  @TableField(value = "`opt_uid`")
  @JoinField(SysUser.class)
  @Schema(title = "采购员")
  private Long optUid;

  /**
   * 店铺
   */
  @TableField(value = "`sid`")
  @JoinField(ShopInfo.class)
  @Schema(title = "店铺")
  private Long sid;
}
